package com.umakr.demo.controller;

import com.umakr.demo.model.Combobox;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by yangliu on 2017/7/29.
 */
@RequestMapping("/test")
@Controller
public class TestController {
//    @RequestMapping("/day02")
//    public ModelAndView day02(){
//        ModelAndView mav = new ModelAndView();
//        mav.setViewName("day02/concatArray");
//        return mav;
//    }


    @RequestMapping("/aa")
    public ModelAndView aa(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("index");
        return mav;
    }
    @RequestMapping("/ajax")
    @ResponseBody
    public Object ajax(){
        Map<String,Object> map = new HashMap<String,Object>();
        map.put("123",999);
        map.put("465",888);
        return map;
}


    //    自己写的
    @RequestMapping("/list")
    public ModelAndView list(Combobox.User user){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("admin/user/list");
        return mav;
    }
}
